//
//  CircleViewController.m
//  10703
//
//  Created by student on 16/2/22.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "CircleViewController.h"
#import "RectViewController.h"
@interface CircleViewController ()

@property (nonatomic,strong) RectViewController *Rect;
@property (nonatomic,strong) CircleViewController *Circle;
@end

@implementation CircleViewController

- (RectViewController *)Rect
{
    if (!_Rect) {
        _Rect = [[RectViewController alloc] init];
    }
    return _Rect;
}

- (CircleViewController *)Circle
{
    if (!_Circle) {
        _Circle = [[CircleViewController alloc] init];
    }
    return _Circle;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)mj:(id)sender
{
    [self.view insertSubview:self.Circle.view atIndex:0];
    [self.Rect.view removeFromSuperview];
}

- (IBAction)tj:(id)sender
{
    
    [self.view insertSubview:self.Rect.view atIndex:0];
    [self.Circle.view removeFromSuperview];
    
    
    
}

@end
